package parser.nodes;

// FieldList = [IdentList ':' Type]    /*Die Option wurde nach RecordTypeNode verschoben*/

import java.util.List;
import scanner.Token;

public class FieldListNode extends Node {
    private IdentListNode idents;
    private TypeNode type;

    public FieldListNode(IdentListNode idents, TypeNode type) {
        this.idents = idents;
        this.type = type;
    }
    
    public List<Token> getList() {
        return idents.getIdentList();
    }

    public TypeNode getType() {
        return type;
    }
    
    @Override
    public void print() {
        p("FieldList:");
        indent();
        idents.print();
        p(";");
        type.print();
        unindent();
    }

    @Override
    public void abstractPrint() {
        p("FIELDLIST");
        indent();
        idents.abstractPrint();
        type.abstractPrint();
        unindent();
    }
}
